import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path';

const pathResolve = dir => resolve(__dirname, dir)

export default defineConfig({
  server: {
    host: '127.0.0.1',
    open: true
  },
  resolve: {
    alias: {
      "@": pathResolve("src"),
      "assets": pathResolve("src/assets"),
      "components": pathResolve("src/components"),
      "configs": pathResolve("src/configs"),
      "layouts": pathResolve("src/layouts"),
      "pages": pathResolve("src/pages"),
      "router": pathResolve("src/router"),
      "store": pathResolve("src/store"),

      "plugins": pathResolve("src/plugins"),
      "apis": pathResolve("src/apis"),
      "utils": pathResolve("src/utils")
    }
  },
  plugins: [vue()]
})
